// Last Update:2015-01-26 14:34:26
/**
 * @file hx_dir.c
 * @brief 
 * @author 
 * @version 0.1.00
 * @date 2015-01-26
 */

#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <libHX/io.h>

int main()
{
	char *dentry = NULL;
	struct HXdir *dh;
	if ((dh = HXdir_open(".")) == NULL) {
		fprintf(stderr, "Could not open directory: %s\n", strerror(errno));
		return;
	}
	while ((dentry = HXdir_read(dh)) != NULL)
		printf("%s\n", dentry);
	HXdir_close(dh);

	return 0;
}
